/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utils;

import java.util.logging.Level;
import java.util.logging.Logger;

public class CommonUtils {

    public static int convertStringToInt(String s) {
        int i=0;
        try {
             i= Integer.parseInt(s);
        } catch (NumberFormatException ex) {
            Logger.getLogger(CommonUtils.class.getName()).log(Level.SEVERE, null, ex);
        }
        return i;
    }

    public static boolean isDouble(String price){
        try{
            Double.parseDouble(price);
        } catch(NumberFormatException ex){
            return false;
        }
        return true;
    }
}
